LoginView = Backbone.Marionette.ItemView.extend({
	
	template: "#Login-template",
	tagName: "div",
	id: "LoginView",
	className: "col-xs-6",
	
	events: {
		"click #LoginView_submit"	:	"submit"
	},

	initialize: function(){

	},
	
	submit: function( event ){
		var email = $('#LoginView_email').val();
		var password = $('#LoginView_password').val();
		MyApp.module('LoginModule').trigger('LoginView:login', email, password);
	},
	
	showLoginFail: function(reason){
		console.log("Login fail reason: " + reason);
		$('#LoginView_label').append(reason);
	}
});
